<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>ECharts</title>
	<!-- 引入 echarts.js -->
	<script src="echarts.min.js"></script>
</head>

<body>
	<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
	<div id="main" style="width: 1000px;height:400px;"></div>
	<script type="text/javascript">
		// 基于准备好的dom，初始化echarts实例
		var myChart = echarts.init(document.getElementById('main'));

		// 指定图表的配置项和数据
		var option = {
			title: {
				text: '工件加工进度表',
				left: 10
			},
			legend: {
				data: ['计划实施时间1', '实际实施时间1'],
                right: 20
			},
			grid: {
				containLabel: true,
				left: 20
			},
			xAxis: {
				type: 'value',
				splitNumber:5
				
			},

			yAxis: {
				data: ['工件一', '工件二', '工件三']
			},
			tooltip: {},
			series: [{
					name: '机器1',
					type: 'bar',
					stack: 'test',
					itemStyle: {
						normal: {
							color: 'rgba(0,0,0,0)'
						}
					},
					data: [
						2, 0, 0
					]
				},
				{
					name: '设备1',
					type: 'bar',
					stack: 'test',
					data: [
						3, 2, 0
					]
				},
				{
					name: '设备2',
					type: 'bar',
					stack: 'test',
					itemStyle: {
						normal: {
							color: 'rgba(0,0,0,0)'
						}
					},
					data: [
						0, 0, 0
					]
				},
				{
					name: '设备2',
					type: 'bar',
					stack: 'test',
					data: [
						2, 0, 4
					]
				},
                {
					name: '设备3',
					type: 'bar',
					stack: 'test',
					itemStyle: {
						normal: {
							color: 'rgba(0,0,0,0)'
						}
					},
					data: [
						0, 0, 0
					]
				},
				{
					name: '设备3',
					type: 'bar',
					stack: 'test',
					data: [
						2, 1, 3
					]
				},
				{
					name: '设备2',
					type: 'bar',
					stack: 'test',
					itemStyle: {
						normal: {
							color: 'rgba(0,0,0,0)'
						}
					},
					data: [
						0, 4, 0
					]
				},
				{
					name: '设备2',
					type: 'bar',
					stack: 'test',
					data: [
						0, 4, 0
					]
				}
			]
		};




		// 使用刚指定的配置项和数据显示图表。
		myChart.setOption(option);
	</script>
</body>

</html>
